<template id="head">
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
  <title data-translation="title">Webduino Blockly - 控制三軸加速度計旋轉角度點亮 LED 燈</title>
  <!-- webduino -->
  <script src="/lib/webduino-all.min.js"></script>
  <script src="/lib/webduino-blockly.js"></script>
  <script src="/lib/runtime.min.js"></script>>
</template>
<template id="body">
  <div id="show">
  x: <span id="x"></span><br/>
  y: <span id="y"></span><br/>
  z: <span id="z"></span><br/>
  roll: <span id="r"></span><br/>
  pitch: <span id="p"></span><br/>
  </div>
    <div id="light" class="off">
  <img src='/media/off.jpg'></img>
  <img src='/media/on.jpg'></img>
</div>
</template>
<template id="css">
#show {
  font-size: 20px;
}

#light {
  width: 60%;
}

#light img {
  width: 100%;
  display: none;
}

#light.off img:first-child {
  display: inline-block;
}

#light.on img:last-child {
  display: inline-block;
}
</template>
